Skip to content

release: 4.1.0#62

Open
stainless-app[bot] wants to merge 113 commits intomainfrom
release-please--branches--main--changes--next
Open

release: 4.1.0#62
stainless-app[bot] wants to merge 113 commits intomainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Feb 4, 2025

Automated Release PR

4.1.0 (2026-02-12)

Full Changelog: v4.0.0...v4.1.0

Features

  • api: update via SDK Studio (#61) (9c0c551)
  • clean up environment call outs (696f18b)
  • client: add custom JSON encoder for extended type support (87eaded)
  • client: add follow_redirects request option (6eb41c9)
  • client: add support for aiohttp (6f6ddd9)
  • client: add support for binary request streaming (41c399b)
  • client: allow passing NotGiven for body (#67) (3ad7f25)
  • client: send X-Stainless-Read-Timeout header (#63) (a594c75)
  • client: support file upload requests (fde965a)
  • improve future compat with pydantic v3 (bccbddf)
  • types: replace List[str] with SequenceNotStr in params (0578887)

Bug Fixes

  • asyncify on non-asyncio runtimes (#66) (ca310cd)
  • avoid newer type syntax (db10820)
  • ci: correct conditional (66eb0ef)
  • ci: ensure pip is always available (#78) (d3d295a)
  • ci: release-doctor — report correct token name (65cdccf)
  • ci: remove publishing patch (#79) (493f504)
  • client: close streams without requiring full consumption (e783145)
  • client: correctly parse binary response | stream (3924997)
  • client: don't send Content-Type header on GET requests (6bcbc4e)
  • client: mark some request bodies as optional (3ad7f25)
  • compat with Python 3.14 (f7d6103)
  • compat: update signatures of model_dump and model_dump_json for Pydantic v1 (898ca7b)
  • ensure streams are always closed (f89af68)
  • package: support direct resource imports (ad2d130)
  • parsing: correctly handle nested discriminated unions (cd511d2)
  • parsing: ignore empty metadata (bdd8ead)
  • parsing: parse extra field types (470d8a8)
  • perf: optimize some hot paths (7cc4937)
  • perf: skip traversing types for NotGiven values (38509ba)
  • pydantic v1: more robust ModelField.annotation check (3dc3480)
  • tests: fix: tests which call HTTP endpoints directly with the example parameters (539215f)
  • types: allow pyright to infer TypedDict types within SequenceNotStr (84b4806)
  • types: handle more discriminated union shapes (#77) (8b6dcf0)
  • use async_to_httpx_files in patch method (6bfd0c0)

Chores

  • add Python 3.14 classifier and testing (c172e9c)
  • broadly detect json family of content-type headers (febefbc)
  • bump httpx-aiohttp version to 0.1.9 (7aeb4c8)
  • ci: add timeout thresholds for CI jobs (d5cbcd0)
  • ci: change upload type (d7e4405)
  • ci: enable for pull requests (1ea6fbc)
  • ci: fix installation instructions (6291f4a)
  • ci: only run for pushes and fork pull requests (5d00f3e)
  • ci: only use depot for staging repos (19ee773)
  • ci: upgrade actions/github-script (bdad5ed)
  • ci: upload sdks to package manager (598ec7e)
  • client: minor internal fixes (1e29d3b)
  • deps: mypy 1.18.1 has a regression, pin to 1.17 (fd940b6)
  • do not install brew dependencies in ./scripts/bootstrap by default (67c48f0)
  • docs: grammar improvements (540e711)
  • docs: remove reference to rye shell (ec32daa)
  • docs: update client docstring (#71) (b41543a)
  • docs: use environment variables for authentication in code snippets (ff7f0ef)
  • fix typos (#80) (c1576cc)
  • internal/tests: avoid race condition with implicit client cleanup (d3a5435)
  • internal: add --fix argument to lint script (0b1e68e)
  • internal: add missing files argument to base client (5547d1b)
  • internal: add Sequence related utils (5f815ef)
  • internal: avoid errors for isinstance checks on proxies (5dc0949)
  • internal: base client updates (0ac179a)
  • internal: bump dependencies (5c298f6)
  • internal: bump pinned h11 dep (6cafe07)
  • internal: bump pyright version (81c2baf)
  • internal: bump rye to 0.44.0 (#76) (21a20b3)
  • internal: change ci workflow machines (656643d)
  • internal: codegen related update (0b4efb7)
  • internal: codegen related update (2f8fbc4)
  • internal: codegen related update (d6d5a1d)
  • internal: codegen related update (a145cee)
  • internal: codegen related update (#75) (db19786)
  • internal: detect missing future annotations with ruff (23b94ed)
  • internal: expand CI branch coverage (7fd1145)
  • internal: fix devcontainers setup (#68) (97b7254)
  • internal: fix lint error on Python 3.14 (1d9c80a)
  • internal: fix list file params (1b5e333)
  • internal: fix ruff target version (1437b86)
  • internal: fix type traversing dictionary params (#64) (1322c80)
  • internal: grammar fix (it's -> its) (8b1cdb7)
  • internal: import reformatting (8a3f6f0)
  • internal: minor type handling changes (#65) (7e69125)
  • internal: move mypy configurations to pyproject.toml file (f87b268)
  • internal: properly set pydantic_private (#69) (bc25b84)
  • internal: reduce CI branch coverage (2492996)
  • internal: refactor retries to not use recursion (055e329)
  • internal: remove extra empty newlines (#74) (3d90dff)
  • internal: remove trailing character (#81) (4cfa80b)
  • internal: remove unused http client options forwarding (#72) (69a44e3)
  • internal: slight transform perf improvement (#82) (5498eaf)
  • internal: update actions/checkout version (54d6bd9)
  • internal: update comment in script (103820e)
  • internal: update conftest.py (83531b4)
  • internal: update models test (421a2b5)
  • internal: update pydantic dependency (5dd09a4)
  • internal: update pyright exclude list (f306088)
  • internal: update pyright settings (2d267e1)
  • package: drop Python 3.8 support (95ca18d)
  • package: mark python 3.13 as supported (06ad64f)
  • project: add settings file for vscode (6754b39)
  • readme: fix version rendering on pypi (b1e9e51)
  • readme: update badges (f3f214f)
  • speedup initial import (3b3f4e6)
  • tests: add tests for httpx client instantiation & proxies (5e172cd)
  • tests: run tests in parallel (497b381)
  • tests: simplify get_platform test (ef07d85)
  • tests: skip some failing tests on the latest python versions (39d037c)
  • types: change optional parameter type from NotGiven to Omit (14cb9a9)
  • update @stainless-api/prism-cli to v5.15.0 (d766a01)
  • update github action (d0f9d9e)
  • update lockfile (77726a0)

Documentation

  • client: fix httpx.Timeout documentation reference (3341b85)
  • update URLs from stainlessapi.com to stainless.com (#70) (08062c4)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

Medium Risk
Touches core request construction/retry/streaming and packaging/runtime compatibility (Python floor + optional aiohttp transport), which could subtly change HTTP behavior or break integrations despite being mostly additive.

Overview
Releases v4.1.0: bumps package/version metadata, updates changelog, and raises the supported floor to Python 3.9+ (plus new 3.13/3.14 classifiers and updated lockfiles/dependencies).

Extends the HTTP client layer with optional aiohttp transport (DefaultAioHttpClient + aiohttp extras), raw/binary request bodies via a new content parameter, follow-redirects support, and more robust request/response behavior (iterative retry loop, idempotency-key reuse, X-Stainless-Read-Timeout header, relaxed JSON content-type detection, SSE streams closing on early exit, and pagination support for JSON-body based requests).

Modernizes developer tooling and CI: upgrades Rye and GitHub Actions, adds a CI build job that can upload built wheels via OIDC, runs tests in parallel, moves mypy config into pyproject.toml, tweaks bootstrap/lint scripts, updates devcontainer/VS Code settings, and refreshes docs/URLs and release scripts (including updated Prism CLI usage).

Written by Cursor Bugbot for commit 74bef2f. This will update automatically on new commits. Configure here.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 6c2b6c5 to a594c75 Compare February 6, 2025 03:11
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 85e4dfe to 1322c80 Compare February 7, 2025 03:11
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 2bb4c49 to 7e69125 Compare February 7, 2025 03:14
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 7cdfb0a to ca310cd Compare February 14, 2025 03:14
fix(client): mark some request bodies as optional
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 3bdb00f to 3ad7f25 Compare February 21, 2025 04:03
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 1be6ce9 to 97b7254 Compare February 22, 2025 03:24
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 35a4088 to bc25b84 Compare February 26, 2025 03:11
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from ef0d130 to 08062c4 Compare February 28, 2025 03:03
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 9257acd to b41543a Compare February 28, 2025 03:05
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from df1d708 to 69a44e3 Compare March 4, 2025 03:29
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from cf36bae to bba1424 Compare March 11, 2025 11:58
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from e0b03f0 to 3d90dff Compare March 14, 2025 08:46
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 84a0625 to db19786 Compare March 15, 2025 07:00
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 359644d to 21a20b3 Compare March 15, 2025 07:03
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from f7c66f3 to f0262a9 Compare December 3, 2025 07:27
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from f0262a9 to 3524f04 Compare December 9, 2025 05:23
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 3524f04 to 9bd1046 Compare December 16, 2025 05:10
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 9bd1046 to f263f8c Compare December 17, 2025 07:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from f263f8c to 5cddd6f Compare December 18, 2025 08:51
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 5cddd6f to 590d7c8 Compare December 19, 2025 07:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 590d7c8 to 07aac58 Compare January 6, 2026 06:30
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 07aac58 to d01a3f6 Compare January 14, 2026 09:53
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from d01a3f6 to 1e2a487 Compare January 17, 2026 07:16
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 1e2a487 to 1efa099 Compare January 24, 2026 06:19
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 1efa099 to d60e2bc Compare January 30, 2026 06:02
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from d60e2bc to 2df8211 Compare February 10, 2026 06:18
line-length = 120
output-format = "grouped"
target-version = "py37"
target-version = "py38"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruff target-version inconsistent with minimum Python version

Low Severity

The ruff target-version was changed from "py37" to "py38", but the project's requires-python was updated to ">= 3.9" and pyright's pythonVersion is set to "3.9". The ruff target should be "py39" to match. This inconsistency means ruff applies formatting/linting rules for Python 3.8 compatibility even though the project no longer supports it — for example, the FA102 rule may unnecessarily flag missing from __future__ import annotations in files that only need 3.9+ support.

Additional Locations (2)

Fix in Cursor Fix in Web

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 2df8211 to 74bef2f Compare February 12, 2026 08:03
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

request = self._build_request(options, retries_taken=retries_taken)
self._prepare_request(request)
retries_taken = 0
for retries_taken in range(max_retries + 1):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterative retry loop breaks math.inf unlimited retries

Medium Severity

The refactored retry logic uses range(max_retries + 1) which crashes with TypeError when max_retries is math.inf, since range() requires integer arguments. The old recursive approach handled this correctly because it only compared remaining_retries > 0. The error message in __init__ still explicitly recommends math.inf for unlimited retries, making this a documented-but-broken feature.

Additional Locations (2)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants